import request from "./request";
//首页
function getHomeList(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/shop/findShopByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
//店铺审核表格
function getFindgoShopByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/customized/bus/admin/feedback/findFeedbackByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
// //店铺审核
// function getFindgoShopByPage(data) {
//   if (data.searchObj) {
//     var shop = data.searchObj;
//   }
//   return request({
//     url: `/admin/shop/findgoShopByPage?page=${data.page}&limit=${data.limit}`,
//     method: "get",
//     data: shop
//   });
// }
//首页商铺添加
function getShopAdd(data) {
  return request({
    url: `/admin/shop/addShop`,
    method: "post",
    data
  });
}
//首页商铺编辑
function getShopEdit(data) {
  return request({
    url: `/admin/shop/editShop`,
    method: "post",
    data
  });
}
//首页商铺获取详情
function getByIdShopt(id) {
  return request({
    url: `/customized/bus/admin/feedback/selectFeedbackByIdFeedback`,
    method: "get",
    data: {
      id
    }
  });
}
//首页商铺删除
function getShopDel(data) {
  return request({
    url: `/admin/shop/delShop`,
    method: "get",
    data
  });
}
//首页banner
// POST / customized / bus / admin / api / addBusUser;
function getShopBanner(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/customized/bus/admin/api/findBusUserByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function gitOrderList(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/customized/bus/admin/busOrder/findBusOrderByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
//首页banner添加
function getShopBannerAdd(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/customized/bus/admin/api/addBusUser`,
    method: "post",
    data
  });
}
//首页banner修改
function getShopBannereDitResources(data) {
  return request({
    url: `/customized/bus/admin/api/editBusUser`,
    method: "post",
    data
  });
}
//首页banner详情
function getBannerEditResources(id) {
  return request({
    url: `/customized/bus/admin/api/selectBusUserByIdBusUser`,
    method: "get",
    data: {
      id
    }
  });
}
//首页banner获取所有商品
function getGoodsListl(data) {
  return request({
    url: `/admin/goodsType/getlist`,
    method: "get",
    data
  });
}
//首页banner删除
function getShopBannerDel(data) {
  return request({
    url: `/customized/bus/admin/api/delBusUser`,
    method: "get",
    data
  });
}
//商品管理
function getFindGoodsByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/goods/findGoodsByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
//商品管理-查询商品品牌
function getSysBrand(data) {
  return request({
    url: `/admin/sysDict/SysBrand`,
    method: "get",
    data
  });
}
//商品管理-查询商品类目
function getSysGoodClass(data) {
  return request({
    url: `/admin/sysDict/selectSysGoodClass`,
    method: "get",
    data
  });
}
//商品管理-查询所有店铺
function getSysFindAlls(data) {
  return request({
    url: `/admin/shop/findAll`,
    method: "get",
    data
  });
}
//商品管理-查询所有店铺
function getSysAddGoods(data) {
  return request({
    url: `/admin/goods/addGoods`,
    method: "post",
    data
  });
}
//商品管理-删除商品
function getSysDelGoodss(data) {
  return request({
    url: `/admin/goods/delGoods`,
    method: "get",
    data
  });
}
//商品管理-商品详情
function getSysSelectGoodsByIdGoods(id) {
  return request({
    url: `/admin/goods/selectGoodsByIdGoods`,
    method: "get",
    data: {
      id
    }
  });
}
//商品管理-商品修改
function getSysEditGoods(data) {
  return request({
    url: `/admin/goods/editGoods`,
    method: "post",
    data
  });
}
//商品管理-添加商品规格
function getAddGoodAttr(data) {
  return request({
    url: `/admin/goodAttr/addGoodAttr`,
    method: "post",
    data
  });
}
//商品管理-查询商品规格
function getByGoodId(id) {
  return request({
    url: `/admin/goodAttr/byGoodId`,
    method: "get",
    data: {
      goodid: id
    }
  });
}
//商品管理-删除商品规格
function getDelGoodAttr(id) {
  return request({
    url: `/admin/goodAttr/delGoodAttr`,
    method: "get",
    data: {
      id
    }
  });
}
//商品管理-商品规格组合信息
function getFindGoodAttrDetaileAll(goodid) {
  return request({
    url: `/admin/goodAttrDetailed/findGoodAttrDetaileAll`,
    method: "get",
    data: {
      goodid
    }
  });
}
//商品管理-商品规格修改
function getEditGoodAttrDsetaileds(data) {
  return request({
    url: `/admin/goodAttrDetailed/editGoodAttrDetailed`,
    method: "post",
    data
  });
}
//商品类型-类型首页表格
function getGoodsType(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `customized/bus/admin/BusRole/findBusRoleByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
//商品类型-类型树形菜单
function getGoodsTypeTreeinfo(data) {
  return request({
    url: `/customized/bus/admin/busPermission/treePermission`,
    method: "get",
    data
  });
}
//商品类型-添加类型
function getAddGoodsType(data) {
  return request({
    url: `/customized/bus/admin/BusRole/addBusRole`,
    method: "post",
    data
  });
}
//商品类型-编辑类型
function getEditGoodsType(data) {
  return request({
    url: `/customized/bus/admin/BusRole/editBusRole`,
    method: "post",
    data
  });
}
//商品类型-类型详情
function getByIdGoodsType(data) {
  return request({
    url: `/customized/bus/admin/BusRole/selectBusRoleByIdBusRole`,
    method: "get",
    data
  });
}
//商品类型-类型删除
function getDelGoodsTypee(data) {
  return request({
    url: `/customized/bus/admin/BusRole/delBusRole`,
    method: "get",
    data
  });
}
//商品订单-全部订单
function getOrderByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/order/findOrderByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
//商品订单-订单详情
function getOrderByIdOrder(data) {
  return request({
    url: `/admin/order/selectOrderByIdOrder`,
    method: "get",
    data
  });
}
//查询单位
function getFindCompany(data) {
  return request({
    url: `/admin/sysDict/findCompany`,
    method: "get",
    data
  });
}
function login(data) {
  return request({
    url: `/customized/bus/admin/api/login`,
    // url: `http://192.168.1.109/admin/user/login?username=${data.username}&password=${data.password}`,
    method: "get",
    data
  });
}
function info(data) {
  return request({
    url: `/admin/user/selectUserByIdUser`,
    // url: `http://192.168.1.109/admin/user/login?username=${data.username}&password=${data.password}`,
    method: "get",
    data
  });
}
function getOrderdetails(data) {
  return request({
    url: `/admin/riderOrder/orderdetails`,
    // url: `http://192.168.1.109/admin/user/login?username=${data.username}&password=${data.password}`,
    method: "get",
    data
  });
}
function getEditOrder(data) {
  return request({
    url: `/admin/order/editOrder`,
    method: "post",
    data
  });
}
function getPermissionInfo(data) {
  return request({
    url: `/customized/bus/admin/api/getPermissionInfo`,
    method: "get",
    data
  });
}
function getUserInfo(data) {
  return request({
    url: `/customized/bus/admin/api/getUserInfo`,
    method: "get"
  });
}
function getTreeList(data) {
  return request({
    url: `/admin/sysDict/getlist`,
    method: "get",
    data
  });
}
function getDicByParent(data) {
  return request({
    url: `/admin/sysDict/getDicByParent`,
    method: "get",
    data
  });
}
function selectSysDictByIdSysDict(data) {
  return request({
    url: `/admin/sysDict/selectSysDictByIdSysDict`,
    method: "get",
    data
  });
}
function editSysDict(data) {
  return request({
    url: `/admin/sysDict/editSysDict`,
    method: "post",
    data
  });
}
function addSysDict(data) {
  return request({
    url: `/admin/sysDict/addSysDict`,
    method: "post",
    data
  });
}
function delSysDict(data) {
  return request({
    url: `/admin/sysDict/delSysDict`,
    method: "get",
    data
  });
}
function findCouponByPage(data) {
  return request({
    url: `/admin/coupon/findCouponByPage`,
    method: "get",
    data
  });
}
function addCoupon(data) {
  return request({
    url: `/admin/coupon/addCoupon`,
    method: "post",
    data
  });
}
function selectCouponByIdCoupon(data) {
  return request({
    url: `/admin/coupon/selectCouponByIdCoupon`,
    method: "get",
    data
  });
}
function delCoupon(data) {
  return request({
    url: `/admin/coupon/delCoupon`,
    method: "get",
    data
  });
}
function editCoupon(data) {
  return request({
    url: `/admin/coupon/editCoupon`,
    method: "post",
    data
  });
}
function findlist(data) {
  return request({
    url: `/admin/wxUser/findlist`,
    method: "get",
    data
  });
}

function addCouponWxuser(data) {
  return request({
    url: `/admin/couponWxuser/addCouponWxuser`,
    method: "post",
    data
  });
}
function orderstatis(data) {
  return request({
    url: `/admin/order/orderstatis`,
    method: "get",
    data
  });
}
function statistics(data) {
  return request({
    url: `/admin/order/statistics`,
    method: "get",
    data
  });
}
function avgOrder(data) {
  return request({
    url: `/admin/order/avgOrder`,
    method: "get",
    data
  });
}
function comParison(data) {
  return request({
    url: `/admin/order/comParison`,
    method: "get",
    data
  });
}
function findWxUserByPage(data) {
  return request({
    url: `/admin/wxUser/findWxUserByPage`,
    method: "get",
    data
  });
}
function delWxUser(data) {
  return request({
    url: `/admin/wxUser/delWxUser`,
    method: "get",
    data
  });
}
function selectWxUserByIdWxUser(data) {
  return request({
    url: `/admin/wxUser/selectWxUserByIdWxUser`,
    method: "get",
    data
  });
}
function findUserByPage(data) {
  return request({
    url: `/admin/user/findUserByPage`,
    method: "get",
    data
  });
}
function selectUserByIdUser(data) {
  return request({
    url: `/admin/user/selectUserByIdUser`,
    method: "get",
    data
  });
}
function addUser(data) {
  return request({
    url: `/admin/user/addUser`,
    method: "post",
    data
  });
}
function editUser(data) {
  return request({
    url: `/admin/user/editUser`,
    method: "post",
    data
  });
}
function selectAllRole(data) {
  return request({
    url: `/admin/role/selectAllRole`,
    method: "get",
    data
  });
}
function findRoleByPage(data) {
  return request({
    url: `/admin/role/findRoleByPage`,
    method: "get",
    data
  });
}
function addRole(data) {
  return request({
    url: `/admin/role/addRole`,
    method: "post",
    data
  });
}
function selectRoleByIdRole(data) {
  return request({
    url: `/admin/role/selectRoleByIdRole`,
    method: "get",
    data
  });
}
function editRole(data) {
  return request({
    url: `/admin/role/editRole`,
    method: "post",
    data
  });
}
function treePermission(data) {
  return request({
    url: `/admin/permission/treePermission`,
    method: "get",
    data
  });
}
function alloCation(data) {
  return request({
    url: `/admin/rolePermission/alloCation`,
    method: "get",
    data
  });
}

function findVipByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/car/vip/findVipByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function addVip(data) {
  return request({
    url: `/admin/car/vip/addVip`,
    method: "post",
    data
  });
}
function selectVipByIdVip(data) {
  return request({
    url: `/admin/car/vip/selectVipByIdVip`,
    method: "get",
    data
  });
}
function editVip(data) {
  return request({
    url: `/admin/car/vip/editVip`,
    method: "post",
    data
  });
}
function delVip(data) {
  return request({
    url: `/admin/car/vip/delVip`,
    method: "get",
    data
  });
}
function findBusRechargeByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/BusRecharge/findBusRechargeByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function findUserCardByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/UserCard/findUserCardByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function selectBusRechargeByIdBusRecharge(data) {
  return request({
    url: `/admin/BusRecharge/selectBusRechargeByIdBusRecharge`,
    method: "get",
    data
  });
}
function selectUserCardByIdUserCard(data) {
  return request({
    url: `/admin/UserCard/selectUserCardByIdUserCard`,
    method: "get",
    data
  });
}
function addCarShopGoods(data) {
  return request({
    url: `/admin/CarShopGoods/addCarShopGoods`,
    method: "post",
    data
  });
}
function findAllCarShopType(data) {
  return request({
    url: `/admin/CarShopType/findAllCarShopType`,
    method: "get",
    data
  });
}
function findCarShopGoodsByPagepage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/CarShopGoods/findCarShopGoodsByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function CarShopGoodsFindAll(data) {
  return request({
    url: `admin/CarShopGoods/findAll`,
    method: "get",
    data
  });
}
function selectCarShopGoodsByIdCarShopGoods(data) {
  return request({
    url: `/admin/CarShopGoods/selectCarShopGoodsByIdCarShopGoods`,
    method: "get",
    data
  });
}
function delCarShopGoods(data) {
  return request({
    url: `/admin/CarShopGoods/delCarShopGoods`,
    method: "get",
    data
  });
}
function editCarShopGoods(data) {
  return request({
    url: `/admin/CarShopGoods/editCarShopGoods`,
    method: "post",
    data
  });
}
function findUserCarByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/userCar/findUserCarByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function findCarKeepMainByPageAdmin(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/car/CarKeepMain/findCarKeepMainByPageAdmin?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function findCarUserProjectByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/admin/CarShopType/findCarUserProjectByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function selectByIdCarUserProject(data) {
  return request({
    url: `/admin/CarShopType/selectByIdCarUserProject`,
    method: "get",
    data
  });
}
function editCarUserProject(data) {
  return request({
    url: `/admin/CarShopType/editCarUserProject`,
    method: "post",
    data
  });
}
function findPageAdmin(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `admin/CarOrder/findPageAdmin?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function byIdCarOrder(data) {
  return request({
    url: `admin/CarOrder/byIdCarOrder`,
    method: "get",
    data
  });
}
function updateCarUserProject(data) {
  return request({
    url: `/admin/CarShopType/updateCarUserProject`,
    method: "post",
    data
  });
}
function editWxUser(data) {
  return request({
    url: `/admin/wxUser/editWxUser`,
    method: "post",
    data
  });
}
function rolePermissionByid(data) {
  return request({
    url: `/admin/rolePermission/rolePermissionByid`,
    method: "get",
    data
  });
}
function delAllInfo(data) {
  return request({
    url: `/admin/role/delAllInfo`,
    method: "get",
    data
  });
}
function userByShop(data) {
  return request({
    url: `/admin/shop/userByShop`,
    method: "get",
    data
  });
}
function seleCarKeep(data) {
  return request({
    url: `/admin/car/CarKeepMain/selectCarKeepMainByIdCarKeepMain`,
    method: "get",
    data
  });
}
function delUser(data) {
  return request({
    url: `/admin/user/delUser`,
    method: "get",
    data
  });
}
function getMap(data) {
  return request({
    url: `/admin/BusApi/getBusInfo`,
    method: "get",
    data
  });
}
function findStationInfoAllByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `admin/bus/StationInfo/findStationInfoAllByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function getWxUserByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/customized/bus/admin/wxUser/WxUserByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function gitWxMsg(data) {
  return request({
    url: `/customized/bus/admin/wxUser/selectWxUserByIdWxUser`,
    method: "get",
    data
  });
}
function gitRoleList(data) {
  return request({
    url: `/customized/bus/admin/BusRole/getBusRoleAll`,
    method: "get",
    data
  });
}
function editBusUserRole(data) {
  return request({
    url: `/customized/bus/admin/busUserRole/editBusUserRole`,
    method: "post",
    data
  });
}
function gitOrderDetails(data) {
  return request({
    url: `/customized/bus/admin/busOrder/selectBusOrderByIdBusOrder`,
    method: "get",
    data
  });
}
function gitPaiCheList(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/customized/bus/admin/sendCar/findSendCarByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function editBusOrder(data) {
  return request({
    url: `/customized/bus/admin/busOrder/editBusOrder`,
    method: "post",
    data
  });
}

function delBusOrder(data) {
  return request({
    url: `/customized/bus/admin/busOrder/delBusOrder`,
    method: "get",
    data
  });
}

function findSendCarByPage(data) {
  if (data.searchObj) {
    var shop = data.searchObj;
  }
  return request({
    url: `/customized/bus/admin/sendCar/findSendCarByPage?page=${data.page}&limit=${data.limit}`,
    method: "get",
    data: shop
  });
}
function selectSendCarByIdSendCar(data) {
  return request({
    url: `/customized/bus/admin/sendCar/selectSendCarByIdSendCar`,
    method: "get",
    data
  });
}

function editSendCar(data) {
  return request({
    url: `/customized/bus/admin/sendCar/editSendCar`,
    method: "post",
    data
  });
}
// GET /customized/bus/admin/sendCar/findSendCarByPage
export default {
  editSendCar,
  selectSendCarByIdSendCar,
  findSendCarByPage,
  delBusOrder,
  editBusOrder,
  gitPaiCheList,
  gitOrderDetails,
  gitOrderList,
  editBusUserRole,
  gitRoleList,
  gitWxMsg,
  getWxUserByPage,
  getMap,
  findStationInfoAllByPage,
  delUser,
  seleCarKeep,
  userByShop,
  delAllInfo,
  rolePermissionByid,
  editWxUser,
  updateCarUserProject,
  byIdCarOrder,
  findPageAdmin,
  editCarUserProject,
  selectByIdCarUserProject,
  findCarUserProjectByPage,
  findCarKeepMainByPageAdmin,
  findUserCarByPage,
  editCarShopGoods,
  delCarShopGoods,
  selectCarShopGoodsByIdCarShopGoods,
  CarShopGoodsFindAll,
  findAllCarShopType,
  addCarShopGoods,
  findCarShopGoodsByPagepage,
  findUserCardByPage,
  selectUserCardByIdUserCard,
  selectBusRechargeByIdBusRecharge,
  findBusRechargeByPage,
  delVip,
  editVip,
  selectVipByIdVip,
  addVip,
  findVipByPage,
  alloCation,
  treePermission,
  editRole,
  addRole,
  selectRoleByIdRole,
  findRoleByPage,
  selectAllRole,
  editUser,
  addUser,
  selectUserByIdUser,
  findUserByPage,
  selectWxUserByIdWxUser,
  delWxUser,
  findWxUserByPage,
  comParison,
  avgOrder,
  statistics,
  orderstatis,
  addCouponWxuser,
  findlist,
  editCoupon,
  delCoupon,
  selectCouponByIdCoupon,
  addCoupon,
  findCouponByPage,
  delSysDict,
  addSysDict,
  editSysDict,
  selectSysDictByIdSysDict,
  getDicByParent,
  getTreeList,
  getUserInfo,
  getPermissionInfo,
  getEditOrder,
  info,
  getHomeList,
  getShopAdd,
  getShopEdit,
  getShopDel,
  getShopBanner,
  getShopBannerAdd,
  getGoodsListl,
  getShopBannerDel,
  getByIdShopt,
  getBannerEditResources,
  getFindgoShopByPage,
  getFindGoodsByPage,
  getSysBrand,
  getSysGoodClass,
  getSysFindAlls,
  getSysAddGoods,
  getSysDelGoodss,
  getSysSelectGoodsByIdGoods,
  getSysEditGoods,
  getAddGoodAttr,
  getByGoodId,
  getDelGoodAttr,
  getFindGoodAttrDetaileAll,
  getEditGoodAttrDsetaileds,
  getGoodsType,
  getGoodsTypeTreeinfo,
  getAddGoodsType,
  getEditGoodsType,
  getByIdGoodsType,
  getDelGoodsTypee,
  getOrderByPage,
  getOrderByIdOrder,
  getFindCompany,
  login,
  getOrderdetails,
  getShopBannereDitResources
};
